package kuzha.runtime;

import java.util.Map;

import kuzha.KuzhaObject;

public class BooleanPattern extends CasePattern {
	public final boolean value;
	
	private BooleanPattern(boolean value) {
		this.value = value;
	}
	
	@Override
	public boolean match(KuzhaObject value, Map<String, KuzhaObject> vars) {
		return value instanceof KzBoolean && ((KzBoolean)value).value == this.value;
	}
	
	public static final BooleanPattern TRUE = new BooleanPattern(true);
	public static final BooleanPattern FALSE = new BooleanPattern(false);
}
